#pragma once
#include "../../app_frame/bitmap.h"

class KTexture : public KBitmapDataHolder
{
private:
	// Implementation dependent data
	void* mTextureData;
public:
	int mBpp;
	int mWidth;
	int mHeight;

public:
	KTexture();
	~KTexture();
	
	// Implementation dependent methods
	bool CreateFromFile(const char* fileName, bool forceGray);
	void Reset();
	bool CreateFromScratch(int w, int h, KFormat format);
	bool UpdateRect(int sx, int sy, int w, int h, void* pData);
	bool Bind();
	
	virtual bool BeginEdit();
	virtual void EndEdit();
	virtual bool Allocate(int w, int h, KFormat format);
	virtual void* GetRowPtr(int row);

};